package kr.hkit.powerjava.chapter08.submit;

public class Circle {

	private int r ;
	private int cx,cy;
	private final double PI = 3.14;
	
	
	public Circle(int r, int cx, int cy) {
		this.r = r;
		this.cx = cx;
		this.cy = cy;
	}
	
	public int getR() {
		return r;
	}
	public void setR(int r) {
		this.r = r;
	}
	public int getCx() {
		return cx;
	}
	public void setCx(int cx) {
		this.cx = cx;
	}
	public int getCy() {
		return cy;
	}
	public void setCy(int cy) {
		this.cy = cy;
	}
	
	public double area() {
		return r*r*PI;
	}
	
	@Override
	public String toString() {
		return "원의 좌표는[cx=" + cx + ", cy=" + cy + "] \n"+ 
				"원의 반지름=" + r + ", 원의 넓이="+ area(); 
	}
}
